

export class AppConfig {
    public static getUrl() {
        return "https://enweb.ourself.top/api/";
    }
    //获取设备高度
    public static getWindowHeight() {
        return window.screen.height;
    }
    //获取设备宽度
    public static getWindowWidth() {
        return window.screen.width;
    }
    public static urlEcode(param, key?, encode?){
        if(param==null) return '';  
        var paramStr = '';  
        var t = typeof (param);  
        if (t == 'string' || t == 'number' || t == 'boolean') {  
            paramStr += '&' + key + '=' + ((encode==null||encode) ? encodeURIComponent(param) : param);  
        } else {  
            for (var i in param) {  
                var k = key == null ? i : key + (param instanceof Array ? '[' + i + ']' : '.' + i);  
                paramStr += this.urlEcode(param[i], k, encode);  
            }  
        }  
        return paramStr.substr(0);  
    }
    public static getMainUrl(){
        return "https://enweb.ourself.top";
    }
    
}